<template>
  <div class="demo p-4">
    <div class="content">
      <div class="header">
        <div class="fontColorRed"> 始发网点:现代物流交易平台 </div>
        <div>货物托运单</div>
        <div> 运单日期: <a-date-picker v-model:value="value1" :format="dateFormat" /> </div>
      </div>

      <a-row style="border-top: 1px solid #78aadd; border-left: 1px solid #78aadd">
        <a-col :md="6">
          <div class="itemDiv fontColorRed">
            <div>运单编号:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
        </a-col>
        <a-col :md="6">
          <div class="itemDiv">
            <div>产品类型:</div>
            <div>
              <a-select v-model:value="value3" placeholder="请选择">
                <a-select-option value="lucy">速提闪送</a-select-option>
                <a-select-option value="lucy">定时达</a-select-option>
                <a-select-option value="lucy">定日达</a-select-option>
                <a-select-option value="lucy">省日达</a-select-option>
                <a-select-option value="lucy">普通产品</a-select-option>
              </a-select>
            </div>
          </div>
        </a-col>
        <a-col :md="6">
          <div class="itemDiv">
            <div>时效:</div>
            <div>
              <a-select v-model:value="value3" placeholder="请选择">
                <a-select-option value="lucy">普通</a-select-option>
                <a-select-option value="lucy">慢运</a-select-option>
              </a-select>
            </div>
          </div>
        </a-col>
        <a-col :md="6">
          <div class="itemDiv">
            <div>客户单号:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
        </a-col>
      </a-row>
      <a-row style="border-left: 1px solid #78aadd">
        <a-col :md="6">
          <div class="itemDiv">
            <div>转入单号:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
        </a-col>
        <a-col :md="6">
          <div class="itemDiv">
            <div>目的区域:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
        </a-col>
        <a-col :md="6">
          <div class="itemDiv">
            <div>目的网点:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
        </a-col>
        <a-col :md="6">
          <div class="itemDiv">
            <div>目的地坐标:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
        </a-col>
      </a-row>

      <div class="addressDiv">
        <div class="address">
          <div>
            <HomeOutlined :style="{ fontSize: '30px', color: '#333' }" />
            <div>发货方</div>
          </div>
          <div>
            <div class="addressInput">
              <div>发货客户编码:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div class="fontColorRed">发货公司:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div class="fontColorRed">发货人:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div class="fontColorRed">发货手机:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div>发货电话:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div class="fontColorRed">始发省市区:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div class="fontColorRed">始发详细地址:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
          </div>
        </div>
        <div class="address">
          <div>
            <UserOutlined :style="{ fontSize: '30px', color: '#333' }" />
            <div>收货方</div>
          </div>
          <div>
            <div class="addressInput">
              <div>收货客户编码:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div>收货公司:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div class="fontColorRed">收货人:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div class="fontColorRed">收货手机:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div>收货电话:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div class="fontColorRed">到达省市区:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
            <div class="addressInput">
              <div class="fontColorRed">到达详细地址:</div>
              <div>
                <a-input style="outline: none" value="" />
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="floatRow">
        <div>货物信息</div>
        <div>
          <div class="rowItem">
            <div class="fontColorRed">货物名称:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
          <div class="rowItem">
            <div class="fontColorRed">包装类型:</div>
            <div>
              <a-select v-model:value="value3" placeholder="请选择">
                <a-select-option value="lucy">纸箱</a-select-option>
                <a-select-option value="lucy">木架</a-select-option>
                <a-select-option value="lucy">膜</a-select-option>
                <a-select-option value="lucy">托</a-select-option>
              </a-select>
            </div>
          </div>
          <div class="rowItem">
            <div class="fontColorRed">货物单位:</div>
            <div>
              <a-select v-model:value="value3" placeholder="请选择">
                <a-select-option value="lucy">件</a-select-option>
                <a-select-option value="lucy">包</a-select-option>
                <a-select-option value="lucy">托</a-select-option>
                <a-select-option value="lucy">桶</a-select-option>
                <a-select-option value="lucy">其他</a-select-option>
              </a-select>
            </div>
          </div>
          <div class="rowItem">
            <div class="fontColorRed">交货类型:</div>
            <div>
              <a-select v-model:value="value3" placeholder="请选择">
                <a-select-option value="lucy">送货</a-select-option>
                <a-select-option value="lucy">自提</a-select-option>
              </a-select>
            </div>
          </div>
          <div class="rowItem">
            <div>保价金额:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
          <div class="rowItem">
            <div>代收货款:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
        </div>
      </div>
      <div class="branchCol">
        <a-row>
          <a-col :md="24" :lg="12">
            <div class="branchColDiv" style="margin-right: 3px">
              <div class="divTitle">
                <div></div>
                <div> 合计运费: </div>
                <text class="fontColorRed">0</text>
              </div>
              <div class="branchCol_div">
                <a-row>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div class="fontColorRed">数量:</div>
                      <div>
                        <a-input style="outline: none" value="" placeholder="(件)" />
                      </div>
                    </div>
                  </a-col>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div class="fontColorRed">重量:</div>
                      <div>
                        <a-input style="outline: none" value="" placeholder="(kg)" />
                      </div>
                    </div>
                  </a-col>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div class="fontColorRed">体积:</div>
                      <div>
                        <a-input style="outline: none" value="" placeholder="(方)" />
                      </div>
                    </div>
                  </a-col>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div class="fontColorRed">单价:</div>
                      <div>
                        <a-input style="outline: none" value="" />
                      </div>
                    </div>
                  </a-col>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div class="fontColorRed">计价方式:</div>
                      <div>
                        <a-select v-model:value="value3" placeholder="请选择">
                          <a-select-option value="lucy">按重量</a-select-option>
                          <a-select-option value="lucy">按体积</a-select-option>
                          <a-select-option value="lucy">按件数</a-select-option>
                          <a-select-option value="lucy">按固定值</a-select-option>
                          <a-select-option value="lucy">按计费重量</a-select-option>
                        </a-select>
                      </div>
                    </div>
                  </a-col>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div class="fontColorRed">计费重量:</div>
                      <div>
                        <a-input style="outline: none" value="" placeholder="(kg)" />
                      </div>
                    </div>
                  </a-col>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div>运费:</div>
                      <div>
                        <a-input style="outline: none" value="" />
                      </div>
                    </div>
                  </a-col>
                </a-row>
              </div>
            </div>
          </a-col>
          <a-col :md="24" :lg="12">
            <div class="branchColDiv" style="margin-left: 3px">
              <div class="divTitle">
                <div></div>
                <div> 付款方式: </div>
              </div>
              <div class="branchCol_div">
                <a-row>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div>运单类型:</div>
                      <div>
                        <a-select v-model:value="value3" placeholder="请选择">
                          <a-select-option value="lucy">平台网络</a-select-option>
                          <a-select-option value="lucy">内部运力</a-select-option>
                        </a-select>
                      </div>
                    </div>
                  </a-col>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div>付款方式:</div>
                      <div>
                        <a-select v-model:value="value3" placeholder="请选择">
                          <a-select-option value="lucy">现付</a-select-option>
                          <a-select-option value="lucy">到付</a-select-option>
                          <a-select-option value="lucy">月结</a-select-option>
                          <a-select-option value="lucy">回单付</a-select-option>
                          <a-select-option value="lucy">现付欠付</a-select-option>
                          <a-select-option value="lucy">混合付</a-select-option>
                        </a-select>
                      </div>
                    </div>
                  </a-col>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div>现付金额:</div>
                      <div>
                        <a-input style="outline: none" value="" />
                      </div>
                    </div>
                  </a-col>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div>月结金额:</div>
                      <div>
                        <a-input style="outline: none" value="" />
                      </div>
                    </div>
                  </a-col>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div>到付金额:</div>
                      <div>
                        <a-input style="outline: none" value="" />
                      </div>
                    </div>
                  </a-col>
                  <a-col :md="8">
                    <div class="branchCol_div_div">
                      <div>回单付金额:</div>
                      <div>
                        <a-input style="outline: none" value="" />
                      </div>
                    </div>
                  </a-col>
                </a-row>
              </div>
            </div>
          </a-col>
        </a-row>
      </div>
      <div class="lineHiehgt"></div>
      <div class="divTitle" style="border-right: 1px solid #78aadd; border-left: 1px solid #78aadd">
        <div></div>
        <div>其他: </div>
      </div>
      <div class="divColumn">
        <div>
          <div>
            <div>回单类型:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
          <div>
            <div>回单编号:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
          <div>
            <div>回单数量:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
          <div>
            <div>等通知放货:</div>
            <div>
              <a-select v-model:value="value3" placeholder="请选择">
                <a-select-option value="lucy">否</a-select-option>
                <a-select-option value="lucy">是</a-select-option>
              </a-select>
            </div>
          </div>
          <div>
            <div>卸货服务:</div>
            <div>
              <a-select v-model:value="value3" placeholder="请选择">
                <a-select-option value="lucy">否</a-select-option>
                <a-select-option value="lucy">是</a-select-option>
              </a-select>
            </div>
          </div>
          <div>
            <div>上楼服务:</div>
            <div>
              <a-select v-model:value="value3" placeholder="请选择">
                <a-select-option value="lucy">否</a-select-option>
                <a-select-option value="lucy">是</a-select-option>
              </a-select>
            </div>
          </div>
          <div>
            <div>楼层:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
          <div>
            <div>异形件类型:</div>
            <div>
              <a-select v-model:value="value3" placeholder="请选择">
                <a-select-option value="lucy">4米超长</a-select-option>
                <a-select-option value="lucy">6米超长</a-select-option>
                <a-select-option value="lucy">裹包装</a-select-option>
                <a-select-option value="lucy">其他</a-select-option>
              </a-select>
            </div>
          </div>
          <div>
            <div>运输类型:</div>
            <div>
              <a-select v-model:value="value3" placeholder="请选择">
                <a-select-option value="lucy">卡班</a-select-option>
                <a-select-option value="lucy">空运</a-select-option>
                <a-select-option value="lucy">同城</a-select-option>
                <a-select-option value="lucy">同省</a-select-option>
              </a-select>
            </div>
          </div>
          <div>
            <div>业务员:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
          <div>
            <div class="fontColorRed">状态网点:</div>
            <div>
              <a-input style="outline: none" value="现代物流交易平台" />
            </div>
          </div>
          <div>
            <div>佣金回扣:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
          <div>
            <div class="fontColorRed">状态类型:</div>
            <div>
              <a-input style="outline: none" value="收货" />
            </div>
          </div>
          <div style="width: 400px">
            <div style="padding-left: 30px; text-align: left">备注:</div>
            <div>
              <a-input style="outline: none" value="" />
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script lang="ts">
  import { defineComponent, ref } from 'vue';
  import moment, { Moment } from 'moment';
  import { HomeOutlined, UserOutlined } from '@ant-design/icons-vue';
  export default defineComponent({
    components: {
      HomeOutlined,
      UserOutlined,
    },
    setup() {
      const dateFormat = 'YYYY/MM/DD';
      return {
        value3: '',
        value1: ref<Moment>(moment(new Date(), dateFormat)),
      };
    },
  });
</script>
<style lang="less" scoped>
  .content {
    padding: 6px 10px;
    background-color: #fff;

    .ant-select-selection-search-input {
      border: none;
      box-shadow: none;
    }

    ::v-deep(.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input)
        .ant-select-selector) {
      border-color: transparent !important;
      box-shadow: none !important;
    }

    .ant-input:focus {
      border: none;
      box-shadow: none;
    }

    ::v-deep(.ant-select-selector) {
      border: none !important;
      box-shadow: none;
    }

    .ant-select {
      width: 100%;
    }

    .branchCol {
      display: flex;
      justify-content: space-between;

      .branchColDiv {
        height: 100%;
        border-right: 1px solid #78aadd;
        border-left: 1px solid #78aadd;
      }

      .branchCol_div_div {
        display: flex;
        align-items: center;
        justify-content: space-evenly;
        padding: 5px 0;
        margin-top: 5px;

        & > div {
          &:nth-child(1) {
            width: 100px;
            text-align: right;
          }

          &:nth-child(2) {
            width: 100px;
            border-bottom: 1px solid #e5e5e5;
          }
        }
      }
    }

    .lineHiehgt {
      height: 6px;
      border-top: 1px solid #78aadd;
      border-right: 1px solid #78aadd;
      border-left: 1px solid #78aadd;
    }

    .divColumn {
      width: 100%;
      overflow-x: scroll;
      border-right: 1px solid #78aadd;
      border-bottom: 1px solid #78aadd;
      border-left: 1px solid #78aadd;

      .ant-input {
        text-align: center;
      }

      & > div {
        display: flex;
        width: 1960px;
        // width: auto;

        & > div {
          width: 120px;

          & > div {
            height: 35px;
            line-height: 35px;
            text-align: center;
            border-right: 1px solid #ccc;
            border-bottom: 1px solid #ccc;
            box-sizing: border-box;
          }
        }
      }
    }

    .divTitle {
      display: flex;
      align-items: center;
      width: 100%;
      height: 35px;
      padding: 5px 0;
      line-height: 35px;
      background-color: #cae0f6;
      border-top: 1px solid #78aadd;
      border-bottom: 1px solid #78aadd;

      & > div {
        &:nth-child(1) {
          width: 3px;
          height: 20px;
          margin-left: 10px;
          background-color: #ff8100;
        }

        &:nth-child(2) {
          margin-left: 5px;
          font-weight: 600;
        }
      }

      text {
        margin-left: 5px;
      }
    }

    .rowItem {
      display: flex;
      align-items: center;
      padding: 0 10px;
      border-right: 1px solid #78aadd;

      & > div {
        &:first-child {
          width: 70px;
        }

        &:last-child {
          width: 100px;
        }
      }
    }

    .floatRow {
      position: relative;
      display: flex;
      border-right: 1px solid #78aadd;
      border-left: 1px solid #78aadd;

      & > div {
        &:first-child {
          width: 110px;
          height: 40px;
          font-weight: 600;
          line-height: 40px;
          text-align: center;
          border-right: 1px solid #e5e5e5;
        }

        &:last-child {
          display: flex;
          // width: 970px;
          width: 100%;
          height: 40px;
          overflow-y: scroll;
        }
      }
    }

    .ant-input {
      width: 100%;
      background-color: transparent;
      border: none;
    }

    .addressDiv {
      display: flex;
      justify-content: space-between;
      border-right: 1px solid #78aadd;
      border-bottom: 1px solid #78aadd;
      border-left: 1px solid #78aadd;

      & > div {
        &:nth-child(1) {
          margin-right: 3px;
          border-right: 1px solid #78aadd;
        }

        &:nth-child(2) {
          margin-left: 3px;
          border-left: 1px solid #78aadd;
        }
      }
    }

    .address {
      display: flex;
      width: 100%;

      & > div {
        &:first-child {
          display: flex;
          width: 80px;
          color: #333;
          align-items: center;
          flex-direction: column;
          justify-content: center;
          background-color: #cae0f6;
        }

        &:last-child {
          width: 100%;
          padding: 10px 0;

          .addressInput {
            display: flex;
            align-items: center;
            padding-bottom: 5px;
            margin-left: 10px;

            & > div {
              &:first-child {
                width: 120px;
                padding-right: 3px;
                color: #333;
                text-align: right;
              }

              &:last-child {
                width: 100%;
                border-bottom: 1px solid #e5e5e5;
              }
            }
          }
        }
      }
    }

    .itemDiv {
      position: relative;
      display: flex;
      align-items: center;
      height: 33px;
      padding: 0 5px;
      border-right: 1px solid #78aadd;
      border-bottom: 1px solid #78aadd;

      & > div {
        margin-right: 5px;
        // font-size: 14px;

        &:first-child {
          position: absolute;
          padding-left: 5px;
          text-align: right;
        }

        &:last-child {
          width: 100%;
          padding-left: 80px;

          .ant-calendar-picker {
            width: 100%;
          }
        }
      }
    }

    .fontColorRed {
      color: rgb(255, 0, 0);
    }

    .header {
      display: flex;
      margin: 10px;
      align-items: flex-end;
      justify-content: space-between;

      & > div {
        &:nth-child(1) {
          font-size: 16px;
        }

        &:nth-child(2) {
          padding: 5px 10px;
          font-size: 24px;
          border-bottom: 1px solid #000;
        }

        &:nth-child(3) {
          font-size: 16px;
        }
      }
    }
  }
</style>
